package parser;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author 石小俊
 * @date 2023年07月12日 16:50
 */
public class ClassBean {
    private String no;
    private Map<String,StudentBean> students = new HashMap<>();

    @Override
    public String toString() {
        return "ClassBean{" +
                "no='" + no + '\'' +
                ", students=" + students +
                '}';
    }

    public void addStudent(StudentBean student){
        students.put(student.getId(),student);
    }

    public StudentBean findStudent(String id){
        return students.get(id);
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public Map<String, StudentBean> getStudents() {
        return students;
    }

    public void setStudents(Map<String, StudentBean> students) {
        this.students = students;
    }
}
